package com.example.newfxdemo.util;


import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

//@Data
//@AllArgsConstructor
//@NoArgsConstructor
@Data
@AllArgsConstructor
@NoArgsConstructor
@ApiModel(value = "统一的json对象")
public class Result<T> {
    @ApiModelProperty("状态码  200--成功    500--服务器错误")
    private Integer code = 200;
    @ApiModelProperty("消息响应内容")
    private String msg = "操作成功";
    @ApiModelProperty("响应的数据")
    private T t;

    public Result(T t) {
        this.t = t;
        this.code = 200;
        this.msg = "操作成功";
    }
}
